<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">{{a}}</div>
    <script src="../dist/vue.js"></script>
    <script>
        const vm = new Vue({
            el: '#app',
            data() {
                return { a: 1 }
            }
        });

        // dom操作都是同步的，是页面渲染，你更改dom后，页面没渲染但是dom树已经更改了
        vm.a = 'zf'; // [内部先放了一个a=1 , 用户的回调]  
        vm.$nextTick(() => { 
            console.log(document.getElementById('app').innerHTML)
        })
    </script>
</body>

</html>